home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Languages / MPW Oberon 2.1168 / OInterfaces / ADSPSecure.mod < prev    next >
Encoding:
Text File  |  1995-08-10  |  3.6 KB  |  91 lines  |  [TEXT/MPS ]

  1. (*
  2.      File:        ADSPSecure.mod
  3.  
  4.      Contains:    Secure AppleTalk Data Stream Protocol Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Package:    Universal Interfaces 2.1ß1 in “MPW Prerelease” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs.applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. *)
  19.  
  20. (*$TAGS-*)
  21. (*$CALLING PASCAL*)
  22. MODULE ADSPSecure;
  23.  
  24. IMPORT SYSTEM, Types, AppleTalk, OCE, OCEAuthDir;
  25.  
  26. (* $PUSH*)
  27. (* $ALIGN MAC68K*)
  28. (* $LibExport+*)
  29.  
  30. CONST
  31.     sdspOpen*                    = 229;
  32.  
  33. (*
  34. For secure connections, the eom field of ioParams contains two single-bit flags
  35. (instead of a zero/non-zero byte). They are an encrypt flag (see below), and an
  36. eom flag.  All other bits in that field should be zero.
  37.  
  38. To write an encrypted message, you must set an encrypt bit in the eom field of
  39. the ioParams of your write call. Note*: this flag is only checked on the first
  40. write of a message (the first write on a connection, or the first write following
  41. a write with eom set.
  42. *)
  43.     dspEOMBit*                    = 0;                            (* set if EOM at end of write *)
  44.     dspEncryptBit*                = 1;                            (* set to encrypt message *)
  45.  
  46.     dspEOMMask*                    = ASH(1,dspEOMBit);
  47.     dspEncryptMask*                = ASH(1,dspEncryptBit);
  48.  
  49.     sdspWorkSize*                = 2048;
  50.  
  51.  
  52. TYPE
  53.     TRSecureParams* = RECORD
  54.         localCID*:                INTEGER;                                (* local connection id *)
  55.         remoteCID*:                INTEGER;                                (* remote connection id *)
  56.         remoteAddress*:            AppleTalk.AddrBlock;                                (* address of remote end *)
  57.         filterAddress*:            AppleTalk.AddrBlock;                                (* address filter *)
  58.         sendSeq*:                LONGINT;                                (* local send sequence number *)
  59.         sendWindow*:                INTEGER;                                (* send window size *)
  60.         recvSeq*:                LONGINT;                                (* receive sequence number *)
  61.         attnSendSeq*:            LONGINT;                                (* attention send sequence number *)
  62.         attnRecvSeq*:            LONGINT;                                (* attention receive sequence number *)
  63.         ocMode*:                    Types.SInt8; (* unsigned char *)                (* open connection mode *)
  64.         ocInterval*:                Types.SInt8; (* unsigned char *)                (* open connection request retry interval *)
  65.         ocMaximum*:                Types.SInt8; (* unsigned char *)                (* open connection request retry maximum *)
  66.         secure*:                    BOOLEAN;                                (*  --> TRUE if session was authenticated *)
  67.         sessionKey*:                OCEAuthDir.AuthKeyPtr;                                (* <--> encryption key for session *)
  68.         credentialsSize*:        LONGINT;                                (*  --> length of credentials *)
  69.         credentials*:            Types.Ptr;                                    (*  --> pointer to credentials *)
  70.         workspace*:                Types.Ptr;                                    (*  --> pointer to workspace for connection
  71.                                            align on even boundary and length* = sdspWorkSize *)
  72.         recipient*:                OCEAuthDir.AuthIdentity;                            (*  --> identity of recipient (or initiator if active mode *)
  73.         issueTime*:                OCE.UTCTime;                                (*  --> when credentials were issued *)
  74.         expiry*:                    OCE.UTCTime;                                (*  --> when credentials expiry *)
  75.         initiator*:                OCE.RecordIDPtr;                            (* <--  RecordID of initiator returned here.
  76.                                             Must give appropriate Buffer to hold RecordID
  77.                                             (Only for passive or accept mode) *)
  78.         hasIntermediary*:        BOOLEAN;                                (* <--  will be set if credentials has an intermediary *)
  79.         filler1*:                BOOLEAN;
  80.         intermediary*:            OCE.RecordIDPtr;                            (* <--  RecordID of intermediary returned here.
  81.                                             (If intermediary is found in credentials
  82.                                             Must give appropriate Buffer to hold RecordID
  83.                                             (Only for passive or accept mode) *)
  84.     END;
  85.  
  86.  
  87. (* $ALIGN RESET*)
  88. (* $POP*)
  89.  
  90.  END ADSPSecure.
  91.